<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Cache::SOSO_Cache_Memcache</title>
<link href="../../css/ea.css" rel="stylesheet" type="text/css" />
<script>
function initPage(src) {
	if(parent==this&&(this.location+"").indexOf('EARoot')!=-1)
		document.location=(this.location+"").substring(0,(this.location+"").indexOf('EARoot'))+"index"+(this.location+"").substring((this.location+"").lastIndexOf('.'))+"?goto="+((this.location+"").substring((this.location+"").indexOf('EARoot')+7,(this.location+"").lastIndexOf('.')).replace(/\//g,':').replace(/EA/g,""));
	else
		parent.initPage(src);
}
</script>
</head>
<body onload="initPage(this);" class="Content">
<div class="pageHeader"></div>
<div class="PageBody">
	<span class="ObjectTitle">SOSO_Cache_Memcache  : public   class</span>
	<table border="0" cellpadding="0" cellspacing="0" class="ObjectDetails">
		<tr>
			<td width="15%" class="ObjectDetailsTopic">Created:</td>
			<td width="85%" class="ObjectDetailsValue">2009-7-22 11:03:35</td>
		</tr>
		<tr>
			<td class="ObjectDetailsTopic">Modified:</td>
			<td class="ObjectDetailsValue">2009-11-2 12:33:04</td>
		</tr>
		<tr style="height: 10px"><td colspan="2"></td></tr>
		<tr>
			<td class="ObjectDetailsTopic"><img src="../../images/plus03.gif" align="absmiddle" id="proj" onclick="parent.toggleData(this.id)" />Project:</td>
			<td class="ObjectDetailsValue"></td>
		</tr>
		<tr id="proj00" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Author:</td>
			<td class="ObjectDetailsValue">moonzhang (zyfunny@gmail.com)</td>
		</tr>
		<tr id="proj01" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Version:</td>
			<td class="ObjectDetailsValue">1.0 2008-07-24</td>
		</tr>
		<tr id="proj02" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Phase:</td>
			<td class="ObjectDetailsValue">1.0</td>
		</tr>
		<tr id="proj03" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Status:</td>
			<td class="ObjectDetailsValue">Proposed</td>
		</tr>
		<tr id="proj04" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Complexity:</td>
			<td class="ObjectDetailsValue">Easy</td>
		</tr>
		<tr>
			<td class="ObjectDetailsTopic"><img src="../../images/plus03.gif" align="absmiddle" id="adv" onclick="parent.toggleData(this.id)" />Advanced:</td>
			<td class="ObjectDetailsValue"></td>
		</tr>
		<tr id="adv00" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">UUID:</td>
			<td class="ObjectDetailsValue">{BAF500C5-4254-4980-9E44-2C3D2D4394D1}</td>
		</tr>
		<tr id="adv01" style="display: none;">
			<td class="ObjectDetailsTopic" style="padding-left: 18px;">Appears In:</td>
			<td class="ObjectDetailsValue"><a href="EA138.htm">Cache</a></td>
		</tr>
	</table>
	<div class="ObjectDetailsNotes">基于memcache的缓存类实现  options: [&#39;servers&#39;=&gt;array(array(&quot;host&quot;=&gt;&#39;localhost&#39;,&#39;port&#39;=&gt;11211)),&#39;memcache&#39;=&gt;&#39;&#39;,&#39;host&#39;=&gt;&#39;&#39;,&#39;port&#39;=&gt;&#39;&#39;,&#39;timeout&#39;=&gt;1,&#39;persistent&#39;=&gt;false] <br />@example $tCache = new SOSO_Cache_Memcache(array(&#39;servers&#39;=&gt;array(array(&quot;host&quot;=&gt;&#39;localhost&#39;,&#39;port&#39;=&gt;11211)),&#39;memcache&#39;=&gt;&#39;&#39;,&#39;host&#39;=&gt;&#39;&#39;,&#39;port&#39;=&gt;&#39;&#39;,&#39;timeout&#39;=&gt;1,&#39;persistent&#39;=&gt;false));<br />@package cache</div>

	<div class="TableGroup" id="TableGroup">
		<ul class="ItemTitle">
			<li onClick="parent.toggleItem('Attributes');" id="AttributesTitle">Attributes</li>
			<li onClick="parent.toggleItem('Operations');" id="OperationsTitle">Operations</li>
			<li onClick="parent.toggleItem('Links');" id="LinksTitle">Other Links</li>
		</ul>
<div class="ItemBody" id="AttributesTable">
	<table border="0" cellspacing="0" cellpadding="0" class="Table">
		<tr>
			<td width="40%" class="TableHeading">Attribute</td>
			<td width="60%" class="TableHeading">Details</td>
		</tr>
						<tr>
				<td width="40%" class="TableRow" valign="top"><i>private var</i><br /><strong>&nbsp;&nbsp;mHost</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> 'localhost'<br></i>&nbsp;</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>private var</i><br /><strong>&nbsp;&nbsp;mLinks</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i>&nbsp;</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>private var</i><br /><strong>&nbsp;&nbsp;mMemcache</strong></td>
				<td width="60%" class="TableRow" valign="top"><i></i><div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			Enter description here... &lt;br /&gt;@var Memcache
		</td>
	</tr>
</table></div>
</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>private var</i><br /><strong>&nbsp;&nbsp;mPersistent</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> false<br></i>&nbsp;</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>private var</i><br /><strong>&nbsp;&nbsp;mPort</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> 11211<br></i>&nbsp;</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>public var</i><br /><strong>&nbsp;&nbsp;mServers</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> array()<br></i>&nbsp;</td>
			</tr>			<tr>
				<td width="40%" class="TableRow" valign="top"><i>private var</i><br /><strong>&nbsp;&nbsp;mTimeout</strong></td>
				<td width="60%" class="TableRow" valign="top"><i><i>Initial:</i> 1<br></i>&nbsp;</td>
			</tr>
		</table>
</div><div class="ItemBody" id="OperationsTable">
	<table border="0" cellspacing="0" cellpadding="0" class="Table">
		<tr>
			<td width="40%" class="TableHeading">Operation</td>
			<td width="60%" class="TableHeading">Details</td>
		</tr>
						<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>__construct</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{2C9BBB07-803E-4baf-8DFD-5ECAC714485E}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{2C9BBB07-803E-4baf-8DFD-5ECAC714485E}" border="0" />options: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{2C9BBB07-803E-4baf-8DFD-5ECAC714485E}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{2C9BBB07-803E-4baf-8DFD-5ECAC714485E}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{2C9BBB07-803E-4baf-8DFD-5ECAC714485E}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{2C9BBB07-803E-4baf-8DFD-5ECAC714485E}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>addServer</strong>():var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>delete</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{E7E0D97F-A320-4322-8DA2-3B0E93CC2E04}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{E7E0D97F-A320-4322-8DA2-3B0E93CC2E04}" border="0" />key: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{E7E0D97F-A320-4322-8DA2-3B0E93CC2E04}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{E7E0D97F-A320-4322-8DA2-3B0E93CC2E04}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{E7E0D97F-A320-4322-8DA2-3B0E93CC2E04}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{E7E0D97F-A320-4322-8DA2-3B0E93CC2E04}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>flush</strong>():var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>gc</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{15F23E0B-39F8-42cb-BA91-04635BC9DFF5}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{15F23E0B-39F8-42cb-BA91-04635BC9DFF5}" border="0" />maxlifetime: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{15F23E0B-39F8-42cb-BA91-04635BC9DFF5}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{15F23E0B-39F8-42cb-BA91-04635BC9DFF5}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{15F23E0B-39F8-42cb-BA91-04635BC9DFF5}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{15F23E0B-39F8-42cb-BA91-04635BC9DFF5}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			垃圾回收,执行时间可能会较长 &lt;br /&gt;@param bool $force 是否强制进行回收&lt;br /&gt;@return mixed
		</td>
	</tr>
</table></div>

				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>isCached</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{47D1F415-A292-4344-9AA4-04B5887FAD0F}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{47D1F415-A292-4344-9AA4-04B5887FAD0F}" border="0" />key: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{47D1F415-A292-4344-9AA4-04B5887FAD0F}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{47D1F415-A292-4344-9AA4-04B5887FAD0F}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{47D1F415-A292-4344-9AA4-04B5887FAD0F}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{47D1F415-A292-4344-9AA4-04B5887FAD0F}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>isExpired</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{BB0E230B-4652-4ee5-9E71-F5CC370E17A4}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{BB0E230B-4652-4ee5-9E71-F5CC370E17A4}" border="0" />key: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{BB0E230B-4652-4ee5-9E71-F5CC370E17A4}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{BB0E230B-4652-4ee5-9E71-F5CC370E17A4}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{BB0E230B-4652-4ee5-9E71-F5CC370E17A4}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{BB0E230B-4652-4ee5-9E71-F5CC370E17A4}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>read</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{0D66E537-9305-487c-9B8C-7167D3AA8E62}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{0D66E537-9305-487c-9B8C-7167D3AA8E62}" border="0" />key: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{0D66E537-9305-487c-9B8C-7167D3AA8E62}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{0D66E537-9305-487c-9B8C-7167D3AA8E62}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{0D66E537-9305-487c-9B8C-7167D3AA8E62}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{0D66E537-9305-487c-9B8C-7167D3AA8E62}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					
				</td>
			</tr>
			<tr>
				<td width="40%" class="TableRow">
					<i>public</i><br />
					<strong>write</strong>(<br />
					<a href="#" onclick="parent.toggleData('param{136DF839-2DB5-4655-8A89-60735E0E2D16}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{136DF839-2DB5-4655-8A89-60735E0E2D16}" border="0" />key: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{136DF839-2DB5-4655-8A89-60735E0E2D16}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{136DF839-2DB5-4655-8A89-60735E0E2D16}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{136DF839-2DB5-4655-8A89-60735E0E2D16}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{136DF839-2DB5-4655-8A89-60735E0E2D16}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{76217FCD-A517-4fc7-8CA9-E3A63F5E93C0}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{76217FCD-A517-4fc7-8CA9-E3A63F5E93C0}" border="0" />data: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{76217FCD-A517-4fc7-8CA9-E3A63F5E93C0}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td></td>
						</tr>
						<tr id="param{76217FCD-A517-4fc7-8CA9-E3A63F5E93C0}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{76217FCD-A517-4fc7-8CA9-E3A63F5E93C0}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{76217FCD-A517-4fc7-8CA9-E3A63F5E93C0}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
					<a href="#" onclick="parent.toggleData('param{158825E9-CC02-47f4-8F6E-73E0D2C723DB}')" style="text-decoration: none; color: #000000;"><img src="../../images/plus03.gif" align="absmiddle" id="param{158825E9-CC02-47f4-8F6E-73E0D2C723DB}" border="0" />expire: var</a>, 
					<table border="0" cellspacing="0" cellpadding="0" class="Table" style="padding: 4px 18px;">
						<tr id="param{158825E9-CC02-47f4-8F6E-73E0D2C723DB}00" style="display: none;">
							<td width="50"><strong>Default:</strong></td>
							<td>null</td>
						</tr>
						<tr id="param{158825E9-CC02-47f4-8F6E-73E0D2C723DB}01" style="display: none;">
							<td width="50"><strong>Kind:</strong></td>
							<td>in</td>
						</tr>
						<tr id="param{158825E9-CC02-47f4-8F6E-73E0D2C723DB}02" style="display: none;">
							<td width="50"><strong>Stereotype: </strong></td>
							<td></td>
						</tr>
						<tr id="param{158825E9-CC02-47f4-8F6E-73E0D2C723DB}03" style="display: none;">
							<td width="50"></td>
							<td></td>
						</tr>
					</table>
):var
				</td>
				<td width="60%" class="TableRow">
					<i>Sequential  </i>
					<table>
						<tr>
							<td valign = "top"><i></i><span style="margin-left: .7cm;"> </span></td>
							<td></td>
						</tr>
					</table>
					<div class="ObjectDetailsNotes"><table>
	<tr>
		<td valign="top">
			<i>Notes: </i><span style="margin-left: .4cm;"> </span>
		</td>
		<td>
			创建/更新数据缓存 &lt;br /&gt;@param string $k      key值&lt;br /&gt;@param string $v      数据&lt;br /&gt;@param mixed $expire  过期时间，如果为null，则使用cachetime的值&lt;br /&gt;@see set&lt;br /&gt;@return bool
		</td>
	</tr>
</table></div>

				</td>
			</tr>

		</table>
</div>		<div class="ItemBody" id="LinksTable">
			<table align="center" border="0" cellspacing="0" cellpadding="0" class="Table">
				<tr>
					<td width="30%" class="TableHeading">Object</td>
					<td width="15%" class="TableHeading">Type</td>
					<td width="15%" class="TableHeading">Connection</td>
					<td width="40%" class="TableHeading">Notes</td>
				</tr>
				<tr>
					<td width="30%" class="TableRow" valign="top"><a href="../EA23.htm">SOSO_Cache</a></td>
					<td width="15%" class="TableRow" valign="top">Class</td>
					<td width="15%" class="TableRow" valign="top">Generalization</td>
					<td width="40%" class="TableRow" valign="top">&nbsp;</td>
				</tr>

			</table>
		</div>
	</div>
<div class="pageFooter"></div>
 
</body>
</html>